import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
let app = createApp(App)

// 路由
import router from './router'
app.use(router)

// elmentplus  引入UI样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// icon图标 安装导入注册
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(ElementPlus, {
    locale: zhCn,
})

// 引入字体图标库
import "@/assets/fonts/iconfont.js";

// 引入svg组件
import SvgIcon from "@/components/SvgIcon.vue";
// 注册全局组件
app.component("SvgIcon", SvgIcon);


// 注册pinia
import { createPinia } from 'pinia'
app.use(createPinia())//注入pinia


// datav-vue3
import DataVVue3 from '@kjgl77/datav-vue3'
app.use(DataVVue3)

// 引入路由守卫
import "./permission.ts"

app.mount('#app')
